//暴露常量路由
export const constantRoutes = [
  //home主界面
  {
    path: "/layout",
    name: "layout",
    redirect: "/home",
    component: () => import("@/layout/index.vue"),
    meta: {
      title: "layout",
      isHidden: false,
      icon: "Setting",
    },
    children: [
      {
        path: "/home",
        name: "home",
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: "首页",
          isHidden: false,
          icon: "HomeFilled",
        },
      },
    ],
  },

  //管理页面
  {
    path: "/manage",
    name: "manage",
    redirect: "/manage/staff",
    component: () => import("@/layout/index.vue"),
    meta: {
      title: "管理页面",
      isHidden: false,
      icon: "Setting",
    },
    children: [
      {
        path: "staff",
        name: "staff",
        component: () => import("@/views/manage/staff/index.vue"),
        meta: {
          title: "员工管理",
          isHidden: false,
          icon: "UserFilled",
        },
      },
      {
        path: "user",
        name: "user",
        component: () => import("@/views/manage/user/index.vue"),
        meta: {
          title: "用户管理",
          isHidden: false,
          icon: "UserFilled",
        },
      },
    ],
  },

  //路由重定向
  {
    path: "/",
    redirect: "/login",
    meta: {
      title: "",
      isHidden: true,
      icon: "",
    },
  },

  //登录页面
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录",
      isHidden: true,
      icon: "Setting",
    },
  },

  //404界面
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/404/index.vue"),
    meta: {
      title: "404",
      isHidden: true,
      icon: "Setting",
    },
  },

  //全局匹配规则
  {
    path: "/:pathMatch(.*)*",
    name: "any",
    redirect: "/404",
    meta: {
      title: "任意路由",
      isHidden: true,
      icon: "Setting",
    },
  },
];
